package org.nashua.tt151;

import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.SimpleRobot;

public class GyroExample extends SimpleRobot {
    public Gyro gyro = new Gyro(RobotMap.Gyro.GYRO1);
    public Joystick joy = new Joystick(1);
    public void operatorControl() {
        while (isEnabled() && isOperatorControl()) {
            System.out.println("Angle: "+gyro.getAngle());
            if (joy.getRawButton(RobotMap.DualAction.Button.LEFT_TRIGGER))
                gyro.reset();
        }
    }
}
